package com.itzxx.huazhun.ui.device.add

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.itzxx.huazhun.R
import com.itzxx.huazhun.databinding.ActivityDevicesAddBinding
import com.itzxx.huazhun.ui.login.LoginActivity
import com.itzxx.library_base_ktx.base.activity.BaseVmDbActivity

class DevicesAddActivity : BaseVmDbActivity<DeviceAddViewModel, ActivityDevicesAddBinding>() {

    companion object {
        fun startActivity(context: Context) = context.startActivity(
            Intent(
                context,
                DevicesAddActivity()::class.java
            )
        )
    }

    override fun initView(savedInstanceState: Bundle?) {
        setSupportActionBar(mDatabind.tbHead)
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
    }

    override fun createObserver() {
        mViewModel.run {
            keepLiveData.observe(this@DevicesAddActivity){

            }
        }
    }

    override fun databind2ViewModel() {
        super.databind2ViewModel()
        mDatabind.viewmodel = mViewModel
    }

    override fun onSupportNavigateUp(): Boolean {
        finish()
        return true
    }

    override fun isApplyDefaultWaitDialog(): Boolean{
        return true
    }
}